package cn.kuporo.seckill.order.application.service;

import cn.kuporo.seckill.common.model.dto.SeckillOrderSubmitDTO;
import cn.kuporo.seckill.common.model.message.ErrorMessage;
import cn.kuporo.seckill.order.application.model.command.SeckillOrderCommand;
import cn.kuporo.seckill.order.application.model.command.SeckillOrderTaskCommand;
import cn.kuporo.seckill.order.domain.model.entity.SeckillOrder;

import java.util.List;

/**
 * @author: kuporo
 * @since: 2025/7/7
 * @description:
 */
public interface SeckillOrderService {
    /**
     * 保存订单
     */
    Long saveSeckillOrder(SeckillOrderCommand seckillOrderCommand);

    /**
     * 根据用户id获取订单列表
     */
    List<SeckillOrder> getSeckillOrderByUserId(Long userId);
    

    /**
     * 删除订单
     * @param errorMessage
     */
    void deleteOrder(ErrorMessage errorMessage);

    /**
     * 根据任务id获取订单号
     */
    SeckillOrderSubmitDTO getSeckillOrderSubmitDTOByTaskId(SeckillOrderTaskCommand seckillOrderTaskCommand);
}
